package com.gok.seasonmovie.config;


import com.gok.seasonmovie.filter.AuthFilter;
import jakarta.annotation.Resource;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {
    @Resource
    AuthFilter authFilter;

    @Bean
    public FilterRegistrationBean<AuthFilter> registrationBean() {
        FilterRegistrationBean<AuthFilter> filterRegistrationBean = new FilterRegistrationBean(authFilter);
//        filterRegistrationBean.addUrlPatterns("/**");
        filterRegistrationBean.addInitParameter("excludedUris","/wechat/login");
        return filterRegistrationBean;
    }
}

